package com.baizhi.demo;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queuesToDeclare = {@Queue(value = "hello",durable = "false",autoDelete = "false",exclusive = "false")})
public class Consumer {

    @RabbitHandler
    public void getMessage(String msg) {
        System.out.println(msg);
    }
}
